package day04;

import java.util.Scanner;

public class ScoreLevel {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入成绩:");
        double score = scan.nextDouble();
        ////带数(-25,888,95,85,65,45)
        if (score<0 || score>100){//小于0或大于100的成绩不合法
            System.out.println("成绩不合法.");
        }else if (score>=90){
            System.out.println("A-优秀");
        }else if (score>=80){
            System.out.println("B-良好");
        } else if (score >= 60) {
            System.out.println("C-中等");
        }else {
            System.out.println("D-不及格");
        }
    }
}
